package com.example.demo.jsonplacehoider;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(value="jsonplaceholder",url = "http://jsonplaceholder.typicode.com/")
public interface JSONPlaceHolderClient {
    @GetMapping("/posts")
    List<Post>getPosts();
    @GetMapping("POSTS/{postId}")
    Post getPost(@PathVariable("PostId") Integer postId);
}
